import { ADMIN_ROLE, NOT_LOGIN } from '@/access/accessEnum'

const routes = [
  {
    path: '/',
    name: 'basicLayout',
    component: () => import('../layouts/BasicLayout.vue'),
    children: [
      {
        path: '',
        name: '首页',
        component: () => import('../views/HomeView.vue'),
        meta: {
          isHidden: true,
          access: NOT_LOGIN,
        },
      },
      {
        path: 'admin',
        name: '用户管理',
        component: () => import('../views/AminView.vue'),
        meta: {
          isHidden: true,
          access: ADMIN_ROLE,
        },
      },
      {
        path: 'hidden',
        name: '隐藏页面',
        component: () => import('../views/HiddenView.vue'),
        meta: {
          isHidden: false,
          access: NOT_LOGIN,
        },
      },
      {
        path: 'about',
        name: '关于',
        component: () => import('../views/AboutView.vue'),
        meta: {
          isHidden: true,
          access: NOT_LOGIN,
        },
      },
    ],
  },
]

export default routes
